package ink.lovejinhu.leetcodeMatch;

/**
 * @author jinhu
 * created 2021-07-04 10:32
 */
public class Solution_5800 {
    public int[] buildArray(int[] nums) {
        int[] res = new int[nums.length];
        for (int i = 0; i < nums.length; i++) {
            res[i] = nums[nums[i]];
        }
        return res;
    }

    public static void main(String[] args) {
        Solution_5800 solution_5800 = new Solution_5800();
        int[] test = {0, 2, 1, 5, 3, 4};
        int[] ints = solution_5800.buildArray(test);
        for (int i = 0; i < ints.length; i++) {
            System.out.println(ints[i]);

        }
    }
}
